import {defineStore} from "pinia"


export const userDictStore = defineStore('dict', {
    state: () => ({
        cacheList: {}
    }),

    getters: {
        getCacheUrls: (state) => Object.keys(state.cacheList)

    },
    actions: {
        readCache(url) {
            const res = this.cacheList[url];
            return res !== undefined ? res : [];
        },
        putCache(url, items) {
            this.cacheList[url] = items
        }

    }

})


